package com.yudaob2b.elong.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.StringRedisTemplate;

/**
 * 注册redisTemplate，作为消息队列的发布者
 *
 * @author Kidd.Tan
 * @email 298023780@qq.com
 * @date 7/15/18 12:59 AM
 */
@Configuration
public class RedisPublisherConfig {

    @Bean
    public StringRedisTemplate getRedisTemplate(RedisConnectionFactory redisConnectionFactory) {
        return new StringRedisTemplate(redisConnectionFactory);
    }

}
